/*
 * All rights Reserved, Designed By cloudland Copyright(C) 2010-2014
 *
 * fileName:  IndexWrite.java
 * author:  lei
 * Company:  Cloudland Studio
 * Createdate:  2013-9-19 下午9:20:44
 *   
 * Modification  History:
 *     Date           Author        Version        
 * -------------------------------------------
 * 2013-9-19          Lei            1.0        
 *
 * Why & What is modified:
 * 1.0: 文件创建
 */
package org.cloudland.search.handler;

 /**
 * <pre> 
 * 索引写操作接口
 * </pre>
 * @ClassName  IndexWrite
 * @author  lei
 * @version  %I%, %G%
 * @see  
 * @since   JDK1.6
 *
 */
public interface IndexWrite {

	/** 
     * 设置自动提交
     * @param autoCommit 自动提交 
     */
    void setAutoCommit(boolean autoCommit);
    
    /** 
     * 是否自动提交
     * @return 
     */
    boolean isAutoCommit();
    
    /** 
     * 是否关闭
     * @return 
     */
    boolean isClose();
    
    /** 
     * 新增索引
     * @param source 数据源 
     */
    void add(Object[] source);
    
    /** 
     * 更新索引
     * @param source 数据源
     */
    void update(Object[] source);
    
    /** 
     *  删除索引
     */
    void delete();
    
    /** 
     *  提交
     */
    void commit();
    
    /** 
     *  关闭
     */
    void close();
    
}
